/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
package model;

import java.io.Serializable;
import javax.persistence.*;
import javax.persistence.Entity;
/**
 *
 * @author Marvin Hiemstra
 */
@Entity
@Table(name = "GivenAnswer")
public class GivenAnswer implements Serializable {

    @Id
    @Column(name = "givenAtDate")
    private String date;
    @ManyToOne(fetch = FetchType.LAZY)
    private Student student;
    @ManyToOne(fetch = FetchType.LAZY)
    private Question question;
    
    //@ManyToOne(fetch = FetchType.LAZY)
    //private Question question=new Question();
    
    public GivenAnswer() {
    }

    public GivenAnswer(String date, Answer answer) {
        this.date = date;
        
    }

    

    /*public Question getQuestion() {
        return question;
    }

    public void setQuestion(Question question) {
        this.question = question;
    }*/

    

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }
}
